package com.bawei.caohao20240805.viewmodel

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.bawei.comm.model.bean.LeiBean
import com.bawei.comm.model.util.HttpUtils
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
/**
 * 作者: 曹浩
 * 时间: 2024/8/5
 * 功能描述:
 */
class LoginVIewModel :ViewModel(){
//    图1情感列表模块使用LiveData技术
    val leidata=MutableLiveData<LeiBean>()
    fun getlei(
        userId:Int,
        liveType:Int,
        page:Int,
        size:Int,
    ){
        HttpUtils.httpUtils.server.getlei(userId, liveType, page, size)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe {
                leidata.value=it
            }
    }
}